<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="Thymeleaf"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, roles-scalable=0, minimal-ui">
    <title>permission</title>
    <meta content="Admin Dashboard" name="description"/>
    <meta content="Mannatthemes" name="author"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>

    <link rel="shortcut icon" href="images/favicon.ico">
    <link href="css/animate.min.css" rel="stylesheet" type="text/css">
    <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="plugins/dataTables/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css">
    <link href="css/style.css" rel="stylesheet" type="text/css">
    <script>
        let hasDeletePermission = false;
        let hasUpdatePermission = false;
    </script>
</head>

<body>
<shiro:hasPermission name="user:delete">
    <script>
        hasDeletePermission = true;
    </script>
</shiro:hasPermission>
<shiro:hasPermission name="user:update">
    <script>
        hasUpdatePermission = true;
    </script>
</shiro:hasPermission>
<!-- Page-Title -->
<div class="row">
    <div class="col-sm-12">
        <div class="page-title-box">
            <div class="btn-group pull-right">
                <ol class="breadcrumb hide-phone p-0 m-0">
                </ol>
            </div>
            <h4 class="page-title">权限管理</h4>
        </div>
    </div>
</div>
<!-- end page title end breadcrumb -->
<div class="row">
    <div class="col-lg-12">
        <!--Permission添加模块开始-->
        <!--<div shiro:hasPermission="permission:insert" class="card">
            <div class="card-body">
                <button type="button" class="btn btn-danger" data-toggle="modal" data-target="#addPermissionModal">添加新权限
                </button>
                <div class="modal fade" id="addPermissionModal" tabindex="-1" role="dialog" style="display: none;"
                     aria-hidden="true">
                    <div class="modal-dialog  bounce  animated">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h5 class="modal-title">添加新权限</h5>
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                    <span aria-hidden="true">×</span>
                                </button>
                            </div>
                            <form class="" id="toAddPermission" role="form">
                                <div class="modal-body">

                                    <div class="form-group mb-0">
                                        <label for="addName" class="mb-2 pb-1">权限名字</label>
                                        <input type="text" class="form-control" id="addName" required placeholder="权限名字"/>
                                    </div>

                                    <div class="form-group mb-0">
                                        <label for="addParentId" class="mb-2 pb-1">所属父类</label>
                                        <input type="text" class="form-control" id="addParentId" required placeholder="所属父类"/>
                                    </div>

                                    <div class="form-group mb-0">
                                        <label for="addPercode" class="mb-2 pb-1">操作代码</label>
                                        <input type="text" class="form-control" id="addPercode" required placeholder="操作代码"/>
                                    </div>

                                    <div class="form-group mb-0">
                                        <label for="addHref" class="mb-2 pb-1">restful接口</label>
                                        <input  type="text" class="form-control" id="addHref" required placeholder="restful接口"/>
                                    </div>

                                </div>

                                <div class="modal-footer">
                                    <div>
                                        <button data-dismiss="modal" class="btn btn-secondary waves-effect m-l-5">取消
                                        </button>
                                        <button type="submit" class="btn btn-primary waves-effect waves-light">提交
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>-->
        <!--Permission添加模块结束-->

        <!--Permission更新模块开始-->
        <!--<div  shiro:hasPermission="permission:update">
                <div class="modal fade" id="updatePermissionModal" tabindex="-1" role="dialog" style="display: none;"
                     aria-hidden="true">
                    <div class="modal-dialog  bounce  animated">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h5 class="modal-title">更新</h5>
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                    <span aria-hidden="true">×</span>
                                </button>
                            </div>
                            &lt;!&ndash;更新form表单开始&ndash;&gt;
                            <form class="" id="toUpdatePermission" role="form">

                                <div  class="modal-body">

                                    <div class="form-group mb-0">
                                        <label for="updateName" class="mb-2 pb-1">权限名字</label>
                                        <input type="text" class="form-control" id="updateName" required placeholder="权限名字"/>
                                    </div>

                                    <div class="form-group mb-0">
                                        <label for="updateParentId" class="mb-2 pb-1">所属父类</label>
                                        <input type="text" class="form-control" id="updateParentId" required placeholder="所属父类"/>
                                    </div>

                                    <div class="form-group mb-0">
                                        <label for="updatePercode" class="mb-2 pb-1">操作代码</label>
                                        <input type="text" class="form-control" id="updatePercode" required placeholder="操作代码"/>
                                    </div>

                                    <div class="form-group mb-0">
                                        <label for="updateHref" class="mb-2 pb-1">restful接口</label>
                                        <input type="text" class="form-control" id="updateHref" required placeholder="restful接口"/>
                                    </div>

                                </div>

                                <div class="modal-footer">
                                    <div>
                                        <button data-dismiss="modal" class="btn btn-secondary waves-effect m-l-5">取消
                                        </button>
                                        <button type="submit" class="btn btn-primary waves-effect waves-light">提交
                                        </button>
                                    </div>
                                </div>
                            </form>
                            &lt;!&ndash;更新form表单结束&ndash;&gt;
                        </div>
                    </div>
                </div>
        </div>-->
        <!--Permission更新模块结束-->


        <div class="card">
            <div class="card-body">
                <div id="datatable_wrapper" class="dataTables_wrapper container-fluid dt-bootstrap4 no-footer">

                    <div class="row">
                        <div class="col-sm-12">
                            <table id="datatable" class="table table-bordered dataTable no-footer" role="grid"
                                   aria-describedby="datatable_info" style="width:100%">
                            </table>
                        </div>
                    </div>

                </div>
            </div>

        </div>
    </div> <!-- end col -->
</div>
<!-- end row -->
<!-- jQuery  -->
<script src="js/lib/jquery.min.js"></script>
<script src="js/lib/popper.min.js"></script>
<script src="js/lib/bootstrap.min.js"></script>
<!--tableEdit js-->
<script src="plugins/dataTables/js/jquery.dataTables.min.js"></script>
<script src="plugins/dataTables/js/dataTables.bootstrap4.min.js"></script>
<script src="plugins/dataTables/js/dataTables.responsive.min.js"></script>

<script src="js/lib/modernizr.min.js"></script>
<script src="js/lib/waves.js"></script>
<script src="js/lib/jquery.nicescroll.js"></script>
<script src="js/lib/modal-animation.init.js"></script>
<script src="js/lib/jquery.form.js"></script>

<!--文件相关js-->
<script src="plugins/dataTables/js/dataTables.buttons.min.js"></script>
<script src="plugins/dataTables/js/jszip.min.js"></script>
<script src="plugins/dataTables/js/buttons.html5.min.js"></script>

<!-- Parsley js 表单验证-->
<script type="text/javascript" src="plugins/parsley/parsley.min.js"></script>

<!-- App js -->
<script src="js/lib/app.js"></script>
<script src="js/lib/md5.js"></script>
<script src="js/pages/table.js"></script>
<script src="js/pages/mgr/permission.js"></script>

</body>
</html>